package br.com.ordersys.framework.xml;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

public class MarshallTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		try {
			MarshallableObj o = new MarshallableObj();

			Collection c = new ArrayList();
			
			c.add(new BigDecimal("15.1"));
			c.add(new BigDecimal("22"));
			
			o.setDt(new Date());
			
			o.setLst(c);
			o.setValor(BigDecimal.valueOf(10.3));
			
			SubObj s = new SubObj();
			
			s.setKey("texto do sub");
			s.setTotal(1500);
			
			o.setSubobj(s);
			
			Object2XMLMarshaller om = new Object2XMLMarshaller();
			om.writeTo(o, System.out);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
